package coco.wx.com.module.user.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 *
 * @author srx
 * @since 2020-10-23
 */
@Data
@EqualsAndHashCode
@TableName("t_a_user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 题目ID
     */
    @TableId
    private Long userId;

    /**
     * openId
     */
    @TableField
    private String openId;

    /**
     *  unionId
     */
    @TableField
    private String unionId;

    @TableField
    private String name;

    @TableField
    private String nike_name;

    @TableField
    private String phone;

    @TableField
    private String password;

    @TableField
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String birthday;

    @TableField
    private String idCard;

    /**
     *  逻辑删除
     */
    @TableLogic(value = "ENABLE", delval = "DELETED")
    private String isDeleted;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField( fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField( fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
}
